/**
 * 
 */
package kr.co.insoft.core.model.template.application;

import java.io.Serializable;

import kr.co.insoft.auth.model.security.User;
import flexjson.JSONSerializer;

/**
 * TABLE : T_BASE_EVENT
 * 
 * @author IN-SOFT Inc. Park Jong Taek(jtpark@in-soft.co.kr)
 * 
 */
public class EventEntityModel  implements Serializable {
	
	static final long serialVersionUID = -715645747810155810L;
	
	String eventid;
	String applicationid;
	String eventName;
	String script;
	Long userid;
	String companyid;
	String updatedDate;
	/* OPTIONAL */
	String writer;
	String applicationName;
	String applicationTypeName;
	
	public String toString() {
		return (new JSONSerializer()).deepSerialize(this);
	}
	
	public void setAuth(User user) {
		this.userid = user.getId();
		this.companyid = user.getCompanyId();
	}
	
	
	/**
	 * @return the script
	 */
	public String getScript() {
		return script;
	}

	/**
	 * @param script the script to set
	 */
	public void setScript(String script) {
		this.script = script;
	}

	/**
	 * @return the applicationName
	 */
	public String getApplicationName() {
		return applicationName;
	}
	/**
	 * @param applicationName the applicationName to set
	 */
	public void setApplicationName(String applicationName) {
		this.applicationName = applicationName;
	}

	/**
	 * @return the applicationTypeName
	 */
	public String getApplicationTypeName() {
		return applicationTypeName;
	}

	/**
	 * @param applicationTypeName the applicationTypeName to set
	 */
	public void setApplicationTypeName(String applicationTypeName) {
		this.applicationTypeName = applicationTypeName;
	}

	/**
	 * @return the writer
	 */
	public String getWriter() {
		return writer;
	}

	/**
	 * @param writer the writer to set
	 */
	public void setWriter(String writer) {
		this.writer = writer;
	}

	/**
	 * @return the eventid
	 */
	public String getEventid() {
		return eventid;
	}
	/**
	 * @param eventid the eventid to set
	 */
	public void setEventid(String eventid) {
		this.eventid = eventid;
	}
	/**
	 * @return the applicationid
	 */
	public String getApplicationid() {
		return applicationid;
	}
	/**
	 * @param applicationid the applicationid to set
	 */
	public void setApplicationid(String applicationid) {
		this.applicationid = applicationid;
	}
	/**
	 * @return the eventName
	 */
	public String getEventName() {
		return eventName;
	}
	/**
	 * @param eventName the eventName to set
	 */
	public void setEventName(String eventName) {
		this.eventName = eventName;
	}
	/**
	 * @return the userid
	 */
	public Long getUserid() {
		return userid;
	}
	/**
	 * @param userid the userid to set
	 */
	public void setUserid(Long userid) {
		this.userid = userid;
	}
	/**
	 * @return the companyid
	 */
	public String getCompanyid() {
		return companyid;
	}
	/**
	 * @param companyid the companyid to set
	 */
	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}
	/**
	 * @return the updatedDate
	 */
	public String getUpdatedDate() {
		return updatedDate;
	}
	/**
	 * @param updatedDate the updatedDate to set
	 */
	public void setUpdatedDate(String updatedDate) {
		this.updatedDate = updatedDate;
	}
}
